<div id="tenant-form">
	<p style="font:normal 12px/15px Arial;">Register yourself here, to be a part of SunMart Alliance.</p>

	<dl>
	<dt>
		<label for="companyname">Company Name*:</label>
	</dt>
	<dd>
		<input name="companyname" id="companyname" type="text" />
	</dd>
	<dt>
		<label for="url">Company URL:</label>
	</dt>
	<dd>
		<input name="url" id="url" type="text" />
	</dd>
	<dt>
		<label for="email">Email:</label>
	</dt>
	<dd>
		<input name="email" id="email" type="text" />
		<span class="hint">The thing with the @ symbol and the dot com at the end.<span class="hint-pointer">&nbsp;</span></span>
	</dd>
	<dt>
		<label for="phone">Phone:</label>
	</dt>
	<dd>
		<input name="phone" id="phone" type="text" />
		<span class="hint">The thing with the @ symbol and the dot com at the end.<span class="hint-pointer">&nbsp;</span></span>
	</dd>
	<dt>
		<label for="username">Username:</label>
	</dt>
	<dd>
		<input name="username" id="username" type="text" />
		<span class="hint">Between 4-12 characters.[a-z A-Z 0-9 . _ ] are allowed.<span class="hint-pointer">&nbsp;</span></span>
	</dd>
	<dt>
		<label for="password">Password:</label>
	</dt>
	<dd>
		<input name="password" id="password" type="password" />
		<span class="hint">Between 5-13 characters, but not 7.  Never 7.<span class="hint-pointer">&nbsp;</span></span>
	</dd>
	<dt class="button">&nbsp;</dt>
	<dd class="button">
		<input type="submit" class="button" value="Register" id="submitbtn" />
		<input type="reset" class="button" value="Reset" />
	</dd>
	</dl>

</div>


<script type="text/javascript">

function submitButtonOnClick(){

  var name = $("input#companyname").val();
  var url = $("input#url").val();
  var email = $("input#email").val();
  var phone = $("input#phone").val();
  var username = $("input#username").val();
  var password = $("input#password").val();
  var dataString = 'name='+ name + '&url='+ url +'&email=' + email + '&phone=' + phone+'&username=' + username+'&password=' + password ;

	$.ajax({
		type: "POST",
			url: "index.php/process/tenant_register",
			data: dataString,
			success : function(data){
				$('#tenant-page').html('You have successfully completed the registration process.Please login now.');


			}
	});

}
$(document).ready(function(){
	prepareInputsForHints();

	$('#submitbtn').click(function(){

		submitButtonOnClick();


	});
	

});


</script>
